x86/HVM: add guarding logic for VMX specific code
authorSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Mon, 29 Aug 2016 14:05:31 +0000 (16:05 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 29 Aug 2016 14:05:31 +0000 (16:05 +0200)
commit81caac0cd0f56b0052a7884e6bd99e3a652ddd59
treeda69fd523ed52d866f8c60d5bcd81a658f1e0e2e
parent0d2649370c93a9356f37f50248872e8a0bb5ae40
x86/HVM: add guarding logic for VMX specific code

The struct hvm_domain.vmx is defined in a union along with the svm.
This can causes issue for SVM since this code is used in the common
scheduling code for x86. The logic must check for cpu_has_vmx before
accessing the hvm_domain.vmx sturcture.

Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/include/asm-x86/hvm/hvm.h